home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / Multiprocessing 2.1v2 SDK / Sample Code / PowerFrax / PowerFrax Read Me Part 1 < prev    next >
Encoding:
Text File  |  1999-11-15  |  9.1 KB  |  244 lines  |  [ttro/ttxt]

  1.                                                                                                                                                                                                                      7/22/96
  2.  
  3.  
  4.  
  5. PowerFrax
  6.  
  7. PowerFrax is a benchmarking application that generates fractals from the classic Mandelbrot set. The fractal patterns that are shown on the screen are the result of intense floating point calculations performed for each pixel in the image. The length of time required to perform these calculations is a good measure of the capabilities of the processor or processors performing them. PowerFrax has a built-in timer that allows comparisons to be easily made.
  8.  
  9.  
  10. Using PowerFrax
  11.  
  12. PowerFrax has a number of features that make exploring fractals easy and fun.
  13.  
  14. When you first launch PowerFrax it will open a new window and display the Mandelbrot set. To explore the fractal select this tool in the Info window:
  15.    
  16.  
  17. Now click and drag out a selection within the fractal to create a new fractal zoomed in on the area selected. This is the principle way to explore the fractal. To make a square selection hold down the shift key.
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.     
  35.                                                             Fig.1 The area selected is magnified into a new window
  36.  
  37. Clicking and dragging will work in any fractal window.
  38.  
  39.  
  40. The PowerFrax Tools
  41.  
  42. This section describes the function of the PowerFrax tools.
  43.  
  44.                                                                                                                                                              Drag And Drop.
  45.  
  46. This tool will let you drag a copy of the current window to any application that will accept a dropped picture, e.g. the Scrapbook or the Finder.
  47.  
  48.                                                                                                                                                              Crop.
  49.  
  50. As described above, this tool will let you magnify a selection from an existing fractal into a new window.
  51.  
  52.                                                                                                                                                              Magnify.
  53.  
  54. This tool will let you magnify a fractal. Holding the option key down will let you reduce the fractal.
  55.  
  56.                                                                                                                                                              Shift.
  57.  
  58. This tool will let you shift the fractal. Only the exposed areas will be recalculated. The generation time is not applicable and will not be displayed for a shifted fractal.
  59.  
  60.                                                                                                                                                              Sample.
  61.  
  62. This tool is only available for Julia Set fractals. It is described below.
  63.  
  64.  
  65. The PowerFrax Menus
  66.  
  67. This section describes the options available in the PowerFrax menus.
  68.  
  69. The File Menu
  70.  
  71. New
  72.     Creates a new Mandelbrot set or one of a number of different types of documents if plug-ins are installed.
  73. Open…
  74.     Opens a previously saved fractal.
  75. Cycle…
  76.     All previously saved fractals in the selected folder will be played back repeatedly until 'Stop Cycling' is selected from the File menu.
  77. Close
  78.     Closes the current fractal. Hold down the option key to close all the fractals.
  79. Save
  80.     Saves the current fractal. Note that PowerFrax does not prompt the user to save changed fractals so be sure to save fractals that you like before closing them or quitting PowerFrax.
  81. Save As…
  82.     Same as save except that the user will be prompted to name the fractal.
  83. Page Setup…
  84.     Sets up printing parameters using the standard Page Setup dialog.
  85. Print
  86.     Prints the current fractal.
  87. Quit
  88.     Quits PowerFrax.
  89.  
  90. The Edit Menu
  91.  
  92. Copy
  93.     Copies the current fractal to the clipboard.
  94. Default Fractal…
  95.     Changes the fractal that will be generated when 'New' is selected. This option can also be used to restore the original default fractal.
  96.  
  97. The Control Menu
  98.  
  99. Restart
  100.     Restarts the current fractal from the beginning.
  101. Repeat
  102.     Restarts the current fractal from the beginning. Each time it finishes it will be restarted again after a one second delay.
  103. Exact Colors
  104.     Uses the precise color set associated with the fractal. This option is not needed and is not available when the monitor is in millions of color mode. When this option is used, colors in windows other than the current fractal window may not appear correctly. Monitors with at least 256 colors capability are required for this option to work well.
  105. Animate Colors
  106.     Centers the current fractal on the monitor, grays out the rest of the screen then cycles through all the available colors in the color set associated with the fractal. Use the command key to reverse the direction of the animation. The option key freezes the animation temporarily. The shift key will slow the animation down. Click the mouse or push any other key to end the animation. Note that on multiple monitor systems the fractal will not be centered.
  107.  
  108. The Window Menu
  109.  
  110. Hide Info
  111.     Hides the Info window.
  112. Window Name
  113.     Selects the named window.
  114.  
  115. The Multiprocessing Menu
  116.  
  117. Use 'n' Processors
  118.     Selects the number of processors to be used to regenerate all open fractals and to generate all subsequent fractals.    This menu is only available on multiprocessing systems.
  119.  
  120.     If you type command-'d', the contents of the multiprocessing menu will change. It will provide an option to specify the number of tasks to generate fractals with. The number of tasks that can be created is restricted to 100. Typing command-'d' again will restore the menu to its original state.
  121.  
  122.  
  123. PowerFrax Plug-ins
  124.  
  125.     PowerFrax supports plug-ins that can generate documents with content other than the Mandelbrot set. The available plug-ins are Julia Sets and 3D Projection. They are described after the Mandelbrot section below. Plug-ins appear in a hierchical New menu when they are installed.
  126.  
  127.  
  128. Mandelbrot
  129.  
  130.     The Mandelbrot set is named after Benoit Mandelbrot, a mathematician who did considerable research into fractal systems. It is based on the iterative application of the function f(z) = z*z + c, where z is the result of the previous application and c is a constant point in the complex plane.
  131.  
  132.     To generate a fractal the function f(z) is applied iteratively for each pixel in the image. For each pixel the initial value of z is set to 0 and the value of c is set to the pixel's corresponding point in the complex plane.  The function f(z) is applied repeatedly until the magnitude of f(z) exceeds the escape radius or until the number of iterations equals 255. The number of iterations performed determines the color of the pixel.
  133.  
  134.     When a Mandelbrot window is active the Info window appears as follows:
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.                                                                                             Fig. 2 The Mandelbrot Info Window
  162.  
  163.     The PowerFrax Info window describes the current fractal. White text fields in the Info window can be edited.
  164.  
  165.     The Center fields are the center of the current fractal in the complex plane.
  166.  
  167.     The Step field is the degree of seperation of each pixel from its immediate neighbors in the complex plane.
  168.  
  169.     The Escape Radius field is used to determine when to stop performing iterations.
  170.  
  171.     The Size fields are the the pixel dimensions of the fractal. Editing these two fields is the only way to make the fractal bigger or smaller.
  172.  
  173.     The Colors menu allows the user to recolor the fractal with any one of a variety of different color sets.
  174.  
  175.     The Generation Time display shows how long it took to calculate the current fractal. Only the time required to perform the calculations is measured -nothing else.
  176.  
  177.     The Cursor display shows the position in the complex plane of the pixel under the cursor. If the cursor is not over a fractal then this display will be blank.
  178.  
  179.  
  180. Julia Sets
  181.  
  182.     There is one Julia set for every point in the Mandelbrot set. The Info window content for a Julia Set is very similar to that for a Mandelbrot set.
  183.  
  184.     There are two additional fields defining the point lambda in the Mandelbrot set to which the Julia set corresponds.
  185.  
  186.     There is also a sample tool which will allow lambda to be set quickly by clicking on a point in any open Mandelbrot window. The sample tool may be activated at any time by holding down the option key. Try holding the mouse button down and moving the sample tool around inside a Mandelbrot window. The results can be very impressive on a fast machine.
  187.  
  188.  
  189. 3D Projection
  190.  
  191.     This plugin does not generate a fractal. Instead, it creates a three-dimensional projection of an existing fractal. This plug-in will not be available unless QuickDraw 3D is installed.
  192.  
  193.     The Info window for 3D projections is significantly different from the other two types of plug-ins:
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.                                                                                         Fig. 3 The 3D Projection Info Window
  218.  
  219.     The Projection field states which fractal the projection was derived from. Note that the fractal from which the projection was derived does not have to be left open.
  220.  
  221.     The Tessalation field defines how many pixels in the corresponding base fractal are traversed before a new vertex in the projection is defined. The smaller this number the more polygons there will be in the projection.
  222.  
  223.     Maximum Height defines how 'tall' the projection will be. Making this number negative will turn the projection into valleys instead of mountains.
  224.  
  225.     Rotation Speed defines the angle in degrees between each subsequent frame displayed in a 3D projection window. Setting this number to 0 will make the projection stationary.
  226.  
  227.     Polygon Count states how many polygons are in the 3D projection.
  228.  
  229.     Frame Rate states how many frames per second are being displayed.
  230.  
  231.     The Size fields are the pixel dimensions of the projection document.
  232.  
  233.     The Drag And Drop tool is the only tool available for 3D projections.
  234.  
  235.     The 3D Projection plug-in also installs a menu which contains the following options:
  236.  
  237. The 3D Projection Menu
  238.  
  239. Wire Frame
  240.     Renders the projection as a wire frame.
  241.  
  242. Vertex Shading
  243.     Renders the projection using vertex interpolation.
  244.